import Vue from 'vue'
import VueRouter from 'vue-router'

const My = () => import('../pages/AppContent/My/My.vue')
const Login = () => import('../pages/AppContent/Login/Login.vue')
const RoadAbout = () => import('../pages/AppContent/RoadAbout/RoadAbout.vue')
const TodayAbout = () => import('../pages/AppContent/TodayAbout/TodayAbout.vue')
const AbroadAbout = () => import('../pages/AppContent/AbroadAbout/AbroadAbout.vue')
const NewsAbout = () => import('../pages/AppContent/NewsAbout/NewsAbout.vue')
const DiseaseAbout = () => import('../pages/AppContent/DiseaseAbout/DiseaseAbout.vue')
const Register = () => import('../pages/AppContent/Register/Register.vue')
const HealthDay = () => import('../pages/AppContent/HealthDay/HealthDay.vue')
const AllUser = () => import('../pages/AppContent/AllUser/AllUser.vue')
const FindHealthDay = () => import('../pages/AppContent/FindHealthDay/FindHealthDay.vue')
import AppContent from '../pages/AppContent/AppContent.vue'

Vue.use(VueRouter)

export default new VueRouter({
    routes:[
        {
            path: '/',
            redirect: '/app/my'
        },
        {
            path: '/app',
            component: AppContent,
            meta: {
              showFooter: true
            },
            children: [
                {
                    path: 'my',
                    component: My,
                    meta:{
                        showFooter: true
                    }
                },
                {
                    path: "login",
                    component: Login,
                    meta: {
                        showFooter: false
                    }
                },
                {
                    path: "register",
                    component: Register,
                    meta: {
                        showFooter: false
                    }
                },
                {
                    path: "diseaseAbout",
                    component: DiseaseAbout,
                    meta: {
                        showFooter: true
                    }
                },
                {
                    path: "roadAbout",
                    component: RoadAbout,
                    meta: {
                        showFooter: true
                    }
                },
                {
                    path: "todayAbout",
                    component: TodayAbout,
                    meta: {
                        showFooter: true
                    }
                },
                {
                    path: "abroadAbout",
                    component: AbroadAbout,
                    meta: {
                        showFooter: true
                    }
                },
                {
                    path: "newsAbout",
                    component: NewsAbout,
                    meta: {
                        showFooter: true
                    }
                },
                {
                    path: "healthDay",
                    component: HealthDay,
                    meta: {
                        showFooter: true
                    }
                },
                {
                    path: "allUser",
                    component: AllUser,
                    meta: {
                        showFooter: true
                    }
                },
                {
                    path: "findHealthDay",
                    component: FindHealthDay,
                    meta: {
                        showFooter: true
                    }
                }
            ]
        }
    ]
})
